package me.chanjar.weixin.cp.bean;

import com.google.gson.annotations.SerializedName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import me.chanjar.weixin.cp.util.json.WxCpGsonBuilder;

import java.io.Serializable;

/**
 * @author uianz
 * @description
 * @since 2020/12/23 下午 02:55
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class WxCpTpIdTranslateResultResp extends WxCpBaseResp {

  private static final long serialVersionUID = 1L;

  @SerializedName("jobid")
  private String jobId;

  @SerializedName("status")
  private Integer status;
  
  @SerializedName("type")
  private String type;
  
  @SerializedName("result")
  private Result result;
  
  @Data
  public static class Result implements Serializable{
	  private static final long serialVersionUID = 1L;
	  @SerializedName("contact_id_translate")
	  private ContactIdTranslate contactIdTranslate;
  }
  
  @Data
  public static class ContactIdTranslate implements Serializable{
	  private static final long serialVersionUID = 1L;
	  @SerializedName("url")
	  private String url;
  }
  
  public static WxCpTpIdTranslateResultResp fromJson(String json) {
    return WxCpGsonBuilder.create().fromJson(json, WxCpTpIdTranslateResultResp.class);
  }

}
